#ifndef GAMEOBJECTS_H
#define GAMEOBJECTS_H

#include <string>
#include <vector>
#include "../core/Timer.h"

namespace binge
{

class GameObjects
{
public:
    GameObjects(void);
    ~GameObjects(void);

    int CreateObject(std::string label); // Returns Property Id
    void RemoveObject(int id);

    int GetCount(void);
    int GetId(std::string label);
    int GetIndex(int id);
    int GetIdByIndex(int index);

    void SetLabel(int id, std::string label);
    std::string GetLabel(int id);

    void SetAlive(int id, bool value);
    bool IsAlive(int id);

    void SetLifetime(int id, unsigned int value);
    unsigned int GetLifetime(int id);
    bool IsExpired(int id);

private:
    std::vector<int> objectsId;
    std::vector<std::string> objectsLabel;
    std::vector<bool> objectsAlive;
    std::vector<unsigned int> objectsLifetime;
    std::vector<Timer> objectsTimer;
    int guid; // Unique Identifier
};

} // namespace

#endif // GAMEOBJECTS_H
